package cn.mogugo.comm;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.apache.struts.actions.DispatchAction;

import cn.mogugo.joke.manager.JokeCategoryManager;
import cn.mogugo.joke.manager.JokeObjManager;
import cn.mogugo.joke.manager.JokeWebManager;

public class BaseAction extends DispatchAction{

	
	
	public BaseDao baseDao;
	
	
	public JokeCategoryManager jokeCategoryManager;
	public JokeWebManager jokeWebManager;
	public JokeObjManager jokeObjManager;
	public BaseDao getBaseDao() {
		return baseDao;
	}
	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
	public JokeCategoryManager getJokeCategoryManager() {
		return jokeCategoryManager;
	}
	public void setJokeCategoryManager(JokeCategoryManager jokeCategoryManager) {
		this.jokeCategoryManager = jokeCategoryManager;
	}
	public JokeWebManager getJokeWebManager() {
		return jokeWebManager;
	}
	public void setJokeWebManager(JokeWebManager jokeWebManager) {
		this.jokeWebManager = jokeWebManager;
	}
	public JokeObjManager getJokeObjManager() {
		return jokeObjManager;
	}
	public void setJokeObjManager(JokeObjManager jokeObjManager) {
		this.jokeObjManager = jokeObjManager;
	}
	
	
    public void saveRequestMsg(HttpServletRequest request , String msg){
        ActionMessages messages = new ActionMessages();
        messages.add(messages.GLOBAL_MESSAGE, new ActionMessage(msg , false));
        saveMessages(request.getSession(), messages);
    }
}
